home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / ami301c.zip / QKPOWER.SM$ / QKPOWER.SMM
INI File  |  1993-05-15  |  18KB  |  1,405 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     QMS-PS 810
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     Quickly calculate a number raised to a power.
  19.     
  20.     
  21.     
  22.     
  23.     737494504
  24.     15
  25.     734142332
  26.     174
  27.     6
  28.     0
  29.     0
  30.     0
  31.     0
  32.     
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     1
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [ParaNum]
  54.     1
  55. [tag]
  56.     Body Text
  57.     2
  58.     [fnt]
  59.         Times New Roman
  60.         240
  61.         0
  62.         49152
  63.     [algn]
  64.         1
  65.         1
  66.         0
  67.         0
  68.         0
  69.     [spc]
  70.         33
  71.         273
  72.         1
  73.         0
  74.         0
  75.         1
  76.         100
  77.     [brk]
  78.         4
  79.     [line]
  80.         8
  81.         0
  82.         1
  83.         0
  84.         1
  85.         1
  86.         1
  87.         10
  88.         10
  89.         1
  90.     [spec]
  91.         0
  92.         2
  93.         
  94.         0
  95.         1
  96.         1
  97.         0
  98.         0
  99.         0
  100.         0
  101.     [nfmt]
  102.         280
  103.         1
  104.         2
  105.         .
  106.         ,
  107.         $
  108.     Body Text
  109.     0
  110.     0
  111. [tag]
  112.     Body Single
  113.     3
  114.     [fnt]
  115.         Times New Roman
  116.         240
  117.         0
  118.         49152
  119.     [algn]
  120.         1
  121.         1
  122.         0
  123.         0
  124.         0
  125.     [spc]
  126.         33
  127.         273
  128.         1
  129.         0
  130.         0
  131.         1
  132.         100
  133.     [brk]
  134.         4
  135.     [line]
  136.         8
  137.         0
  138.         1
  139.         0
  140.         1
  141.         1
  142.         1
  143.         10
  144.         10
  145.         1
  146.     [spec]
  147.         0
  148.         0
  149.         
  150.         0
  151.         1
  152.         1
  153.         0
  154.         0
  155.         0
  156.         0
  157.     [nfmt]
  158.         280
  159.         1
  160.         2
  161.         .
  162.         ,
  163.         $
  164.     Body Single
  165.     0
  166.     0
  167. [tag]
  168.     Bullet
  169.     4
  170.     [fnt]
  171.         Times New Roman
  172.         240
  173.         0
  174.         49152
  175.     [algn]
  176.         1
  177.         1
  178.         0
  179.         288
  180.         288
  181.     [spc]
  182.         33
  183.         273
  184.         1
  185.         0
  186.         0
  187.         1
  188.         100
  189.     [brk]
  190.         4
  191.     [line]
  192.         8
  193.         0
  194.         1
  195.         0
  196.         1
  197.         1
  198.         1
  199.         10
  200.         10
  201.         1
  202.     [spec]
  203.         0
  204.         0
  205.         <*0>
  206.         360
  207.         1
  208.         1
  209.         0
  210.         0
  211.         0
  212.         0
  213.     [nfmt]
  214.         272
  215.         1
  216.         2
  217.         .
  218.         ,
  219.         $
  220.     Bullet
  221.     0
  222.     0
  223. [tag]
  224.     Bullet 1
  225.     5
  226.     [fnt]
  227.         Times New Roman
  228.         240
  229.         0
  230.         49152
  231.     [algn]
  232.         1
  233.         1
  234.         288
  235.         288
  236.         288
  237.     [spc]
  238.         33
  239.         273
  240.         1
  241.         0
  242.         0
  243.         1
  244.         100
  245.     [brk]
  246.         4
  247.     [line]
  248.         8
  249.         0
  250.         1
  251.         0
  252.         1
  253.         1
  254.         1
  255.         10
  256.         10
  257.         1
  258.     [spec]
  259.         0
  260.         0
  261.         <*5>
  262.         0
  263.         1
  264.         1
  265.         0
  266.         0
  267.         0
  268.         0
  269.     [nfmt]
  270.         280
  271.         1
  272.         2
  273.         .
  274.         ,
  275.         $
  276.     Bullet 1
  277.     0
  278.     0
  279. [tag]
  280.     Number List
  281.     6
  282.     [fnt]
  283.         Times New Roman
  284.         240
  285.         0
  286.         49152
  287.     [algn]
  288.         1
  289.         1
  290.         360
  291.         360
  292.         360
  293.     [spc]
  294.         33
  295.         273
  296.         1
  297.         0
  298.         0
  299.         1
  300.         100
  301.     [brk]
  302.         4
  303.     [line]
  304.         8
  305.         0
  306.         1
  307.         0
  308.         1
  309.         1
  310.         1
  311.         10
  312.         10
  313.         1
  314.     [spec]
  315.         0
  316.         0
  317.         <*:>.
  318.         360
  319.         1
  320.         1
  321.         0
  322.         16
  323.         0
  324.         0
  325.     [nfmt]
  326.         272
  327.         1
  328.         2
  329.         .
  330.         ,
  331.         $
  332.     Number List
  333.     0
  334.     0
  335. [tag]
  336.     Subhead
  337.     7
  338.     [fnt]
  339.         Times New Roman
  340.         240
  341.         0
  342.         49155
  343.     [algn]
  344.         1
  345.         1
  346.         0
  347.         0
  348.         0
  349.     [spc]
  350.         33
  351.         273
  352.         1
  353.         72
  354.         72
  355.         1
  356.         100
  357.     [brk]
  358.         68
  359.     [line]
  360.         8
  361.         0
  362.         1
  363.         0
  364.         1
  365.         1
  366.         1
  367.         10
  368.         10
  369.         1
  370.     [spec]
  371.         0
  372.         1
  373.         
  374.         0
  375.         1
  376.         1
  377.         0
  378.         0
  379.         0
  380.         0
  381.     [nfmt]
  382.         272
  383.         1
  384.         2
  385.         .
  386.         ,
  387.         $
  388.     Body Text
  389.     0
  390.     0
  391. [tag]
  392.     Title
  393.     8
  394.     [fnt]
  395.         Arial
  396.         360
  397.         0
  398.         16385
  399.     [algn]
  400.         4
  401.         1
  402.         0
  403.         0
  404.         0
  405.     [spc]
  406.         33
  407.         446
  408.         1
  409.         144
  410.         72
  411.         1
  412.         100
  413.     [brk]
  414.         16
  415.     [line]
  416.         8
  417.         0
  418.         1
  419.         0
  420.         1
  421.         1
  422.         1
  423.         10
  424.         10
  425.         1
  426.     [spec]
  427.         0
  428.         0
  429.         
  430.         0
  431.         1
  432.         1
  433.         0
  434.         0
  435.         0
  436.         0
  437.     [nfmt]
  438.         272
  439.         1
  440.         2
  441.         .
  442.         ,
  443.         $
  444.     Title
  445.     0
  446.     0
  447. [tag]
  448.     Header
  449.     9
  450.     [fnt]
  451.         Times New Roman
  452.         240
  453.         0
  454.         49152
  455.     [algn]
  456.         1
  457.         1
  458.         0
  459.         0
  460.         0
  461.     [spc]
  462.         33
  463.         273
  464.         1
  465.         0
  466.         0
  467.         1
  468.         100
  469.     [brk]
  470.         4
  471.     [line]
  472.         8
  473.         0
  474.         1
  475.         0
  476.         1
  477.         1
  478.         1
  479.         10
  480.         10
  481.         1
  482.     [spec]
  483.         0
  484.         0
  485.         
  486.         0
  487.         1
  488.         1
  489.         0
  490.         0
  491.         0
  492.         0
  493.     [nfmt]
  494.         280
  495.         1
  496.         2
  497.         .
  498.         ,
  499.         $
  500.     Header
  501.     0
  502.     0
  503. [tag]
  504.     Footer
  505.     11
  506.     [fnt]
  507.         Times New Roman
  508.         240
  509.         0
  510.         49152
  511.     [algn]
  512.         1
  513.         1
  514.         0
  515.         0
  516.         0
  517.     [spc]
  518.         33
  519.         273
  520.         1
  521.         0
  522.         0
  523.         1
  524.         100
  525.     [brk]
  526.         4
  527.     [line]
  528.         8
  529.         0
  530.         1
  531.         0
  532.         1
  533.         1
  534.         1
  535.         10
  536.         10
  537.         1
  538.     [spec]
  539.         0
  540.         0
  541.         
  542.         0
  543.         1
  544.         1
  545.         0
  546.         0
  547.         0
  548.         0
  549.     [nfmt]
  550.         280
  551.         1
  552.         2
  553.         .
  554.         ,
  555.         $
  556.     Footer
  557.     0
  558.     0
  559. [lay]
  560.     Standard
  561.     513
  562.     [rght]
  563.         15840
  564.         12240
  565.         1
  566.         576
  567.         720
  568.         1
  569.         1080
  570.         576
  571.         0
  572.         1
  573.         0
  574.         1
  575.         0
  576.         2
  577.         1
  578.         576
  579.         11664
  580.         12
  581.         1
  582.         720
  583.         1
  584.         1440
  585.         1
  586.         2160
  587.         1
  588.         2880
  589.         1
  590.         3600
  591.         1
  592.         4320
  593.         1
  594.         5040
  595.         1
  596.         5760
  597.         1
  598.         6480
  599.         1
  600.         7200
  601.         1
  602.         7920
  603.         1
  604.         8640
  605.     [hrght]
  606.     [lyfrm]
  607.         1
  608.         11200
  609.         0
  610.         0
  611.         12240
  612.         1080
  613.         0
  614.         1
  615.         3
  616.         1 0 0 0 0 0 0
  617.         0
  618.         0
  619.         1
  620.     [frmlay]
  621.         1080
  622.         12240
  623.         1
  624.         1440
  625.         72
  626.         1
  627.         288
  628.         1440
  629.         0
  630.         1
  631.         0
  632.         1
  633.         1
  634.         0
  635.         1
  636.         1440
  637.         10800
  638.         2
  639.         2
  640.         4680
  641.         3
  642.         9360
  643.     [txt]
  644. Peyton McManus
  645.  
  646. Lotus WPD
  647.  
  648. >
  649.     [frght]
  650.     [lyfrm]
  651.         1
  652.         13248
  653.         0
  654.         15120
  655.         12240
  656.         15840
  657.         0
  658.         1
  659.         3
  660.         1 0 0 0 0 0 0
  661.         0
  662.         0
  663.         2
  664.     [frmlay]
  665.         15840
  666.         12240
  667.         1
  668.         1440
  669.         648
  670.         1
  671.         15192
  672.         1440
  673.         0
  674.         1
  675.         0
  676.         1
  677.         1
  678.         0
  679.         1
  680.         1440
  681.         10800
  682.         2
  683.         2
  684.         4680
  685.         3
  686.         9360
  687.     [txt]
  688. >
  689. [elay]
  690. [l1]
  691.     0
  692. [edoc]
  693. <:#284,11088>' Example macro to calculate x raised to the y power
  694.  
  695. <:#284,11088>
  696.  
  697. <:#284,11088>Declare FontDlg(Action, Hdlg, id)
  698.  
  699. <:#284,11088>Declare CellEngine(Value)
  700.  
  701. <:#284,11088>
  702.  
  703. <:#284,11088>Define    AnswerHolder        8002
  704.  
  705. <:#284,11088>Define    CopyButton        3
  706.  
  707. <:#284,11088>
  708.  
  709. <:#284,11088>Define    Desc        "Enter a base value (a) and the power (b) to which you want it raised."
  710.  
  711. <:#284,11088>
  712.  
  713. <:#284,11088>Define SetFocus() DllCall("user,SetFocus,HH",%1)
  714.  
  715. Define    EM_SetSel        1025
  716.  
  717.  
  718. @Subhead@<:#284,11088>Function Main()
  719.  
  720. <:#284,11088>Mac = GetRunningMacroFile$()
  721.  
  722. <:#284,11088>FontDlg(1,0,0)
  723.  
  724. <:#284,11088>CellEngine(1)' Start the dll and allocate a global var
  725.  
  726. <:#284,11088>FillEdit(1000,"QKPower.bmt")
  727.  
  728. <:#284,11088>FillEdit(1002, Desc)
  729.  
  730. <:#284,11088>FillEdit(8001,"6")
  731.  
  732. <:#284,11088>FillEdit(AnswerHolder,"64")
  733.  
  734. <:#284,11088>
  735.  
  736. <:#284,11088>SetDlgCallBack(8000,"{Mac}!CallBack")
  737.  
  738. <:#284,11088>SetDlgCallBack(8001,"{Mac}!CallBack")
  739.  
  740. <:#284,11088>SetDlgCallBack(0,"{Mac}!InitDlg")
  741.  
  742. @Outline3@<:#284,11088>DlgKeyInterrupt(112, "{mac}!DisplayHelp")
  743.  
  744. @Outline3@<:#284,11088>
  745.  
  746. <:#284,11088>Box = DialogBox(".","Power")
  747.  
  748. <:#284,11088>If Box = CopyButton
  749.  
  750. <:#284,11088>    Answer = GetDialogField$(AnswerHolder)
  751.  
  752. <:#284,11088>    ClipBoardWrite(Answer, 1)
  753.  
  754. <:#284,11088>Endif
  755.  
  756. <:#284,11088>
  757.  
  758. <:#284,11088>FontDlg(4,0,0)
  759.  
  760. <:#284,11088>CellEngine(0)    ' Shut down the engine
  761.  
  762. <:#284,11088>
  763.  
  764. <:#284,11088>End Function
  765.  
  766. <:#284,11088>
  767.  
  768. <:#284,11088>
  769.  
  770. @Subhead@<:#284,11088>Function InitDlg(Hdlg, id, value)
  771.  
  772. <:#284,11088>IgnoreKeyBoard(2)
  773.  
  774. <:#284,11088>HourGlass(on)
  775.  
  776. <:#284,11088>For x = 1001 to 1006
  777.  
  778. <:#284,11088>    FontDlg(3, Hdlg, x)
  779.  
  780. <:#284,11088>Next
  781.  
  782. <:#284,11088>FontDlg(3, Hdlg,8000)
  783.  
  784. <:#284,11088>FontDlg(3, Hdlg, 8001)
  785.  
  786. SetDlgItemText(Hdlg, 8000,"2")
  787.  
  788. ' this message selects the first 2 characters in the 8000 editbox
  789.  
  790. AppSendMessage(GetDlgITem(Hdlg, 8000),EM_SetSel,0,131072)
  791.  
  792. <:#284,11088>HourGlass(off)
  793.  
  794. <:#284,11088>End Function
  795.  
  796. <:#284,11088>
  797.  
  798. @Subhead@<:#284,11088>Function CallBack(Hdlg, id, value)
  799.  
  800. <:#284,11088>IgnoreKeyBoard(2)
  801.  
  802. <:#284,11088>x = GetDlgItemText(Hdlg, 8000)
  803.  
  804. <:#284,11088>y = GetDlgItemText(Hdlg, 8001)
  805.  
  806. <:#284,11088>Answer = CellEngine("({x})^({y})")
  807.  
  808. <:#284,11088>SetDlgItemText(Hdlg, AnswerHolder, Answer)
  809.  
  810. <:#284,11088>End function
  811.  
  812. <:#284,11088>
  813.  
  814. <:#284,11088>
  815.  
  816. @Subhead@<:#284,11088>function DisplayHelp()
  817.  
  818. @Outline2@<:#284,11088>' two defines needed for help.  The help name and panel number are defined above
  819.  
  820. @Outline2@<:#284,11088>define FindWindowa() DllCall("user,FindWindow,HCC", %1, %2)
  821.  
  822. @Outline2@<:#284,11088>define WinHelpa(hWnd, file, cmd, ptr)    DllCall("user,WinHelp,HHCHJ", %1, %2, %3, %4)
  823.  
  824. @Outline2@<:#284,11088>prohWnd = FindWindowa("AmiProWndA", 0)
  825.  
  826. @Outline2@<:#284,11088>helpfile = strcat$(GetAmiDirectory$(), "HelpPack.hlp")
  827.  
  828. @Outline2@<:#284,11088>PanelNum= 75 
  829.  
  830. @Outline2@<:#284,11088>WinHelpa(prohWnd, helpfile, 0x0001, Panelnum)
  831.  
  832. @Outline2@<:#284,11088>end function
  833.  
  834. @Subhead@<:#284,11088>
  835.  
  836. <:#284,11088>
  837.  
  838. <:#284,11088>
  839.  
  840. <:#284,11088>
  841.  
  842. <:p<* >>
  843.  
  844. @Subhead@<:#284,11088>Function FontDlg(Action, Hdlg, id)
  845.  
  846. <:#284,11088>' 1    Create a font and allocvar
  847.  
  848. <:#284,11088>' 2    Return the handle of the create font 
  849.  
  850. <:#284,11088>' 3    Set the id specified to the font
  851.  
  852. <:#284,11088>' 4    Freeglobalvar and delete created object
  853.  
  854. <:#284,11088>
  855.  
  856. @Outline2@<:#568,11088>define    CreateFontDLG()        DllCall("gdi,CreateFont,HHHHHHHHHHHHHHC", %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14)
  857.  
  858. @Outline2@<:#284,11088>define    DeleteObjectDLG(handle)    DllCall("gdi,DeleteObject,HH", %1)
  859.  
  860. @Outline2@<:#568,11088>define    SendMessageDLG(hwnd, msg, wpara, lparm)    DllCall("user,SendMessage,HHHHJ", %1, %2, %3, %4)
  861.  
  862. @Outline2@<:#284,11088>
  863.  
  864. @Outline2@<:#284,11088>
  865.  
  866. <:#284,11088>Switch Action
  867.  
  868. <:#284,11088>    Case 1    ' Create the font and store it
  869.  
  870. @Outline2@<:#284,11088>        Font = CreateFontDLG(13, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 32, "Helv")
  871.  
  872. <:#284,11088>        AllocGlobalVar("FontHandle",1)
  873.  
  874. <:#284,11088>        If Font
  875.  
  876. <:#284,11088>            SetGlobalVar("FontHandle",Font)
  877.  
  878. <:#284,11088>            Return Font
  879.  
  880. <:#284,11088>        Else
  881.  
  882. <:#284,11088>            Return 0;    ' no font
  883.  
  884. <:#284,11088>        Endif
  885.  
  886. <:#284,11088>        Break;
  887.  
  888. <:#284,11088>    Case 2    ' Return the handle to the font
  889.  
  890. <:#284,11088>        Handle = GetGlobalVar$("FontHandle")
  891.  
  892. <:#284,11088>        If Handle 
  893.  
  894. <:#284,11088>            Return Handle
  895.  
  896. <:#284,11088>        Else
  897.  
  898. <:#284,11088>            Return 0
  899.  
  900. <:#284,11088>        Endif
  901.  
  902. <:#284,11088>
  903.  
  904. <:#284,11088>    Case 3    ' Set the id to the font
  905.  
  906. <:#284,11088>        Handle = GetGlobalVar$("FontHandle")
  907.  
  908. <:#284,11088>        If Handle 
  909.  
  910. <:#284,11088>            IdControl = GetDlgITem(Hdlg, id)
  911.  
  912. <:#284,11088>            SendMessageDlg(idControl, 0x30, Handle, 0)
  913.  
  914. <:#284,11088>            Return 1
  915.  
  916. <:#284,11088>        Else
  917.  
  918. <:#284,11088>            Return 0
  919.  
  920. <:#284,11088>        Endif
  921.  
  922. <:#284,11088>        Break;        
  923.  
  924. <:#284,11088>        
  925.  
  926. <:#284,11088>    Case 4    ' Delete the font and clear the var
  927.  
  928. <:#284,11088>        Handle = GetGlobalVar$("FontHandle")
  929.  
  930. <:#284,11088>        If Handle
  931.  
  932. <:#284,11088>            DeleteObjectDLG(Handle)
  933.  
  934. <:#284,11088>            Stat = 1    
  935.  
  936. <:#284,11088>        Else
  937.  
  938. <:#284,11088>            Stat = 0
  939.  
  940. <:#284,11088>        Endif
  941.  
  942. <:#284,11088>        FreeGlobalVar("FontHandle")
  943.  
  944. <:#284,11088>        Return Stat        
  945.  
  946. <:#284,11088>    Default
  947.  
  948. <:#284,11088>        Message("Fontdlg received an invalid parameter {Action}")
  949.  
  950. <:#284,11088>EndSwitch    
  951.  
  952. <:#284,11088>
  953.  
  954. <:#284,11088>End Function
  955.  
  956. @Subhead@<:p<* >>
  957.  
  958. @Subhead@<:#284,11088>Function CellEngine(Action)
  959.  
  960. <:#284,11088>'Available Actions
  961.  
  962. <:#284,11088>'    1         Start the engine and allocate globalvar
  963.  
  964. <:#284,11088>'    2        Return the handle to the instance of the sheet
  965.  
  966. <:#284,11088>'    0        Shut everything down
  967.  
  968. <:#284,11088>'    Default    Expect a formula and return an answer
  969.  
  970. <:#284,11088>
  971.  
  972. <:#284,11088>' these defines may be useful at the beginning of your macro
  973.  
  974. <:#284,11088>Define StartEngine    1
  975.  
  976. <:#284,11088>Define GetInstance    2
  977.  
  978. <:#284,11088>Define CloseEngine    0
  979.  
  980. <:#284,11088>
  981.  
  982. <:#284,11088>Define    CECREATEINSTANCE(LPHANDLE)    DllCall("LTSCE01.DLL,CECREATEINSTANCE,HO",%1)
  983.  
  984. <:#284,11088>Define    CEDESTROYINSTANCE(HANDLE)    DllCall("LTSCE01.DLL,CEDESTROYINSTANCE,HH",%1)
  985.  
  986. <:#568,11088>Define    CECALCNOW(HINSTANCE, lpFormula, lpOutPut)    DllCall("LTSCE01.DLL,CECALCNOW,HHCC",%1,%2,%3)
  987.  
  988. <:#284,11088>
  989.  
  990. <:#284,11088>DefStr hInstance, Answer, Var;
  991.  
  992. <:#284,11088>Mac = GetRunningMacroFile$()
  993.  
  994. <:#284,11088>GlobalInstance = StrCat$(Mac,"hIstance")
  995.  
  996. <:#284,11088>
  997.  
  998. <:#284,11088>Switch Action
  999.  
  1000. <:#284,11088>    Case 1
  1001.  
  1002. <:#284,11088>        ' start the engine
  1003.  
  1004. <:#284,11088>        LibId = DLLLoadLib("LTSCE01.DLL","CECreateInstance","HO")
  1005.  
  1006. <:#284,11088>        If LibId = 0
  1007.  
  1008. <:#284,11088>            Message("LTSCE01.DLL not found.  Copy the dll to your windows directory")    
  1009.  
  1010. <:#284,11088>            Return -1;
  1011.  
  1012. <:#284,11088>        Endif
  1013.  
  1014. <:#284,11088>        RetVal = CECREATEINSTANCE(&hInstance)
  1015.  
  1016. <:#284,11088>        AllocGlobalVar("{GlobalInstance}",1)
  1017.  
  1018. <:#284,11088>        AllocGlobalVar("{Mac}LibId",1)
  1019.  
  1020. <:#284,11088>        SetGlobalVar("{Mac}Libid",LibId)
  1021.  
  1022. <:#284,11088>        SetGlobalVar("{GlobalInstance}",hInstance)
  1023.  
  1024. <:#284,11088>        Return hInstance;
  1025.  
  1026. <:#284,11088>        Break;
  1027.  
  1028. <:#284,11088>
  1029.  
  1030. <:#284,11088>    Case 2
  1031.  
  1032. <:#284,11088>        ' return the handle to the instance of the sheet
  1033.  
  1034. <:#284,11088>        AllocGlobalVar("{GlobalInstance}",1)
  1035.  
  1036. <:#284,11088>        hInstance = GetGlobalVar$("{GlobalInstance}")
  1037.  
  1038. <:#284,11088>        Return hInstance;
  1039.  
  1040. <:#284,11088>        Break;
  1041.  
  1042. <:#284,11088>
  1043.  
  1044. <:#284,11088>    Case 0
  1045.  
  1046. <:#284,11088>        ' destroy the instance of the sheet and free the global var and libid
  1047.  
  1048. <:#284,11088>        AllocGlobalVar("{GlobalInstance}",1)
  1049.  
  1050. <:#284,11088>        AllocGlobalVar("{Mac}LibId",1)
  1051.  
  1052. <:#284,11088>        hInstance = GetGlobalVar$("{GlobalInstance}")
  1053.  
  1054. <:#284,11088>        LibId = GetGlobalVar$("{Mac}LibId")
  1055.  
  1056. <:#284,11088>        If hInstance
  1057.  
  1058. <:#284,11088>            CEDestroyInstance(hInstance)
  1059.  
  1060. <:#284,11088>            DllFreeLib(Libid)
  1061.  
  1062. <:#284,11088>        Endif
  1063.  
  1064. <:#284,11088>        FreeGlobalVar("{GlobalInstance}")
  1065.  
  1066. <:#284,11088>        FreeGlobalVar("{Mac}LibId")
  1067.  
  1068. <:#284,11088>        Break;
  1069.  
  1070. <:#284,11088>
  1071.  
  1072. <:#284,11088>    Default
  1073.  
  1074. <:#284,11088>        ' Calculate the formula and return the answer
  1075.  
  1076. <:#284,11088>            AllocGlobalVar("{GlobalInstance}",1)
  1077.  
  1078. <:#284,11088>            hInstance = GetGlobalVar$("{GlobalInstance}")
  1079.  
  1080. <:#284,11088>            CECalcNow(hInstance,"{Action}",&Answer)
  1081.  
  1082. <:#284,11088>            Return Answer;
  1083.  
  1084. <:#284,11088>        Break;
  1085.  
  1086. <:#284,11088>EndSwitch
  1087.  
  1088. <:#284,11088>End Function
  1089.  
  1090. @Subhead@<:#284,11088>
  1091.  
  1092. <:#284,11088>
  1093.  
  1094. <:#284,11088>
  1095.  
  1096. <:#284,11088>DIALOG    Power
  1097.  
  1098. <:#284,11088>-2134376448    11    80    33    153    67    ""    "AmiDialog"    "QuickPower"
  1099.  
  1100. <:#284,11088>FONT    8    "Helv"
  1101.  
  1102. <:#284,11088>77    36    23    12    8000    1350631424    "edit"    ""    0 
  1103.  
  1104. <:#284,11088>77    50    23    12    8001    1350631424    "edit"    ""    0 
  1105.  
  1106. <:#284,11088>109    3    40    14    1    1342373889    "button"    "Done"    0 
  1107.  
  1108. <:#284,11088>109    19    40    14    3    1342373888    "button"    "Copy"    0 
  1109.  
  1110. <:#284,11088>6    37    41    23    1000    1342177290    "static"    "filename.bmt"    0 
  1111.  
  1112. <:#284,11088>33    38    44    10    1001    1342177280    "static"    "Base value (a):"    0 
  1113.  
  1114. <:#284,11088>33    52    43    9    1003    1342177280    "static"    "Power (b):"    0 
  1115.  
  1116. <:#284,11088>117    42    27    9    1004    1342177280    "static"    "Answer:"    0 
  1117.  
  1118. <:#284,11088>107    51    40    9    8002    1342177281    "static"    ""    0 
  1119.  
  1120. <:#284,11088>6    4    83    25    1002    1342177280    "static"    "text"    0 
  1121.  
  1122. <:#284,11088>106    36    43    25    20    1342308359    "button"    ""    0 
  1123.  
  1124. <:#284,11088>END DIALOG
  1125.  
  1126. >
  1127.  
  1128. [Embedded]
  1129. 00013881
  1130. >
  1131. [macsum] 7
  1132. Main 0 0 4 13
  1133. InitDlg 440 3 2 39
  1134. CallBack 738 3 4 53
  1135. DisplayHelp 884 0 4 62
  1136. FontDlg 1069 3 5 76
  1137. CellEngine 1915 1 8 133
  1138. Power 2820 0 -1 202
  1139. [macse]
  1140. 14 Main
  1141. 0 802
  1142. 13
  1143. 8 1
  1144. 16 FontDlg 1 0 0
  1145. 16 CellEngine 1
  1146. 0 31 1000 "QKPower.bmt"
  1147. 0 31 1002 "Enter a base value (a) and the power (b) to which you want it raised."
  1148. 0 31 8001 "6"
  1149. 0 31 8002 "64"
  1150. 0 41 8000 "{1}!CallBack"
  1151. 0 41 8001 "{1}!CallBack"
  1152. 0 41 0 "{1}!InitDlg"
  1153. 0 47 112 "{1}!DisplayHelp"
  1154. 0 26 "." "Power"
  1155. 13
  1156. 8 2
  1157. 6 2
  1158. 5 3
  1159. 18 0
  1160. 11 00000393
  1161. 0 27 8002
  1162. 13
  1163. 8 3
  1164. 0 1038 "{3}" 1
  1165. 16 FontDlg 4 0 0
  1166. 16 CellEngine 0
  1167. 6 0
  1168. 15
  1169. 9
  1170. 14 InitDlg
  1171. 0 32 2
  1172. 0 296 1
  1173. 5 1001
  1174. 8 4
  1175. 5 1006
  1176. 6 4
  1177. 18 2
  1178. 12 00000120
  1179. 10 00000159
  1180. 5 1
  1181. 6 4
  1182. 3 0
  1183. 8 4
  1184. 10 00000042
  1185. 16 FontDlg 3 "{0}" "{4}"
  1186. 10 00000087
  1187. 16 FontDlg 3 "{0}" 8000
  1188. 16 FontDlg 3 "{0}" 8001
  1189. 0 43 "{0}" 8000 "2"
  1190. 0 44 "{0}" 8000
  1191. 13
  1192. 0 1036 [X] 1025 0 131072
  1193. 0 296 0
  1194. 6 3
  1195. 15
  1196. 9
  1197. 14 CallBack
  1198. 0 32 2
  1199. 0 42 "{0}" 8000
  1200. 13
  1201. 8 4
  1202. 0 42 "{0}" 8001
  1203. 13
  1204. 8 5
  1205. 16 CellEngine "({4})^({5})"
  1206. 13
  1207. 8 6
  1208. 0 43 "{0}" 8002 "{6}"
  1209. 6 3
  1210. 15
  1211. 9
  1212. 14 DisplayHelp
  1213. 0 284 "user,FindWindow,HCC" "AmiProWndA" 0
  1214. 13
  1215. 8 1
  1216. 0 798
  1217. 13
  1218. 0 16 [X] "HelpPack.hlp"
  1219. 13
  1220. 8 2
  1221. 5 75
  1222. 8 3
  1223. 0 284 "user,WinHelp,HHCHJ" "{1}" "{2}" 1 "{3}"
  1224. 6 0
  1225. 15
  1226. 9
  1227. 14 FontDlg
  1228. 5 1
  1229. 6 0
  1230. 18 0
  1231. 11 00000255
  1232. 0 284 "gdi,CreateFont,HHHHHHHHHHHHHHC" 13 0 0 0 400 0 0 0 0 0 0 0 0 "Helv"
  1233. 13
  1234. 8 4
  1235. 0 271 "FontHandle" 1
  1236. 6 4
  1237. 11 00000217
  1238. 0 264 "FontHandle" "{4}"
  1239. 6 4
  1240. 15
  1241. 9
  1242. 10 00000229
  1243. 5 0
  1244. 15
  1245. 9
  1246. 10 00000834
  1247. 10 00000834
  1248. 5 2
  1249. 6 0
  1250. 18 0
  1251. 11 00000381
  1252. 0 265 "FontHandle"
  1253. 13
  1254. 8 5
  1255. 6 5
  1256. 11 00000356
  1257. 6 5
  1258. 15
  1259. 9
  1260. 10 00000368
  1261. 5 0
  1262. 15
  1263. 9
  1264. 10 00000834
  1265. 5 3
  1266. 6 0
  1267. 18 0
  1268. 11 00000596
  1269. 0 265 "FontHandle"
  1270. 13
  1271. 8 5
  1272. 6 5
  1273. 11 00000558
  1274. 0 44 "{1}" "{2}"
  1275. 13
  1276. 8 6
  1277. 0 284 "user,SendMessage,HHHHJ" "{6}" 48 "{5}" 0
  1278. 5 1
  1279. 15
  1280. 9
  1281. 10 00000570
  1282. 5 0
  1283. 15
  1284. 9
  1285. 10 00000834
  1286. 10 00000834
  1287. 5 4
  1288. 6 0
  1289. 18 0
  1290. 11 00000785
  1291. 0 265 "FontHandle"
  1292. 13
  1293. 8 5
  1294. 6 5
  1295. 11 00000730
  1296. 0 284 "gdi,DeleteObject,HH" "{5}"
  1297. 5 1
  1298. 8 7
  1299. 10 00000740
  1300. 5 0
  1301. 8 7
  1302. 0 266 "FontHandle"
  1303. 6 7
  1304. 15
  1305. 9
  1306. 10 00000834
  1307. 0 3 "Fontdlg received an invalid parameter {0}"
  1308. 6 3
  1309. 15
  1310. 9
  1311. 14 CellEngine
  1312. 0 802
  1313. 13
  1314. 8 5
  1315. 0 16 "{5}" "hIstance"
  1316. 13
  1317. 8 6
  1318. 5 1
  1319. 6 0
  1320. 18 0
  1321. 11 00000427
  1322. 0 297 "LTSCE01.DLL" "CECreateInstance" "HO"
  1323. 13
  1324. 8 7
  1325. 6 7
  1326. 5 0
  1327. 18 0
  1328. 11 00000258
  1329. 0 3 "LTSCE01.DLL not found.  Copy the dll to your windows directory"
  1330. 5 -1
  1331. 15
  1332. 9
  1333. 0 284 "LTSCE01.DLL,CECREATEINSTANCE,HO" &2
  1334. 13
  1335. 8 8
  1336. 0 271 "{6}" 1
  1337. 0 271 "{5}LibId" 1
  1338. 0 264 "{5}Libid" "{7}"
  1339. 0 264 "{6}" "{2}"
  1340. 6 2
  1341. 15
  1342. 9
  1343. 10 00000893
  1344. 10 00000893
  1345. 5 2
  1346. 6 0
  1347. 18 0
  1348. 11 00000531
  1349. 0 271 "{6}" 1
  1350. 0 265 "{6}"
  1351. 13
  1352. 8 2
  1353. 6 2
  1354. 15
  1355. 9
  1356. 10 00000893
  1357. 10 00000893
  1358. 5 0
  1359. 6 0
  1360. 18 0
  1361. 11 00000780
  1362. 0 271 "{6}" 1
  1363. 0 271 "{5}LibId" 1
  1364. 0 265 "{6}"
  1365. 13
  1366. 8 2
  1367. 0 265 "{5}LibId"
  1368. 13
  1369. 8 7
  1370. 6 2
  1371. 11 00000723
  1372. 0 284 "LTSCE01.DLL,CEDESTROYINSTANCE,HH" "{2}"
  1373. 0 298 "{7}"
  1374. 0 266 "{6}"
  1375. 0 266 "{5}LibId"
  1376. 10 00000893
  1377. 10 00000893
  1378. 0 271 "{6}" 1
  1379. 0 265 "{6}"
  1380. 13
  1381. 8 2
  1382. 0 284 "LTSCE01.DLL,CECALCNOW,HHCC" "{2}" "{0}" &3
  1383. 6 3
  1384. 15
  1385. 9
  1386. 10 00000893
  1387. 6 1
  1388. 15
  1389. 9
  1390. DIALOG Power
  1391. -2134376448 11 80 33 153 67 "" "AmiDialog" "QuickPower" 
  1392. FONT 8 "Helv" 
  1393. 77 36 23 12 8000 1350631424 "edit" "" 0 
  1394. 77 50 23 12 8001 1350631424 "edit" "" 0 
  1395. 109 3 40 14 1 1342373889 "button" "Done" 0 
  1396. 109 19 40 14 3 1342373888 "button" "Copy" 0 
  1397. 6 37 41 23 1000 1342177290 "static" "filename.bmt" 0 
  1398. 33 38 44 10 1001 1342177280 "static" "Base value (a):" 0 
  1399. 33 52 43 9 1003 1342177280 "static" "Power (b):" 0 
  1400. 117 42 27 9 1004 1342177280 "static" "Answer:" 0 
  1401. 107 51 40 9 8002 1342177281 "static" "" 0 
  1402. 6 4 83 25 1002 1342177280 "static" "text" 0 
  1403. 106 36 43 25 20 1342308359 "button" "" 0 
  1404. 00013906
  1405.